<template>
	<view class="order-box">

		<view class="order-center">
			<view class="tab-list">
				<u-tabs :list="listTab" bg-color="#FAFAFA" active-color="#020002" :bar-style="style" gutter="40"
					item-width="300" :is-scroll="false" :current="currentIndex" @change="change">
				</u-tabs>
			</view>

			<!-- 接单记录 -->
			<view class="take-order">
				<block v-for="(item, index) in 4" :key="index" v-if="currentIndex == 0">
					<view class="r20 mb20" style="background-color: #FFFFFF;">
						<view class="f24 pl30 pr30  h70 lh70" style="color: #666666;">
							<view class="u-border-bottom">
								订单日期：2021-04-21
							</view>
						</view>
						<view class="flex align-center pl30 pr30 u-border-bottom justify-between h176">
							<view class="flex">
								<image src="../../static/img.jpg" class="w110 h110 r55" mode=""></image>
								<view class="ml30">
									<view class="f30 mb22" style="font-weight: 600;">liuliu</view>
									<text class="f26" style="color: #333333;">和平精英</text>
								</view>
							</view>
							<view class="f24" style="color: #333333;">
								19星
							</view>
						</view>
						<view class="pl30 pr30 h110 flex align-center justify-between">
							<view class="f26">
								合计：
								<text style="color: #FF6000;">38星</text>
							</view>
							<view class="f28">
								<button type="default" class="cu-btn"
									style="background-color: #000000; color: #FFFFFF;">接单</button>
							</view>
						</view>
					</view>

					<view class="r20 mb20" style="background-color: #FFFFFF;">
						<view class="f24 pl30 pr30  h70 lh70" style="color: #666666;">
							<view class="u-border-bottom">
								订单日期：2021-04-21
							</view>
						</view>
						<view class="flex align-center pl30 pr30 u-border-bottom justify-between h176">
							<view class="flex">
								<image src="../../static/img.jpg" class="w110 h110 r55" mode=""></image>
								<view class="ml30">
									<view class="f30 mb22" style="font-weight: 600;">liuliu</view>
									<text class="f26" style="color: #333333;">和平精英</text>
								</view>
							</view>
							<view class="f24" style="color: #333333;">
								19星
							</view>
						</view>
						<view class="pl30 pr30 h110 flex align-center justify-between">
							<view class="f26">
								合计：
								<text style="color: #FF6000;">38星</text>
							</view>
							<view class="f28">

								<button type="default" class="cu-btn"
									style="background-color: #CCCCCC; color: #FFFFFF;">已接单</button>
							</view>
						</view>
					</view>
				</block>

				<block v-else>
					<view class="r20 mb20" style="background-color: #FFFFFF;">
						<view class="f24 pl30 pr30  h70 lh70" style="color: #666666;">
							<view class="u-border-bottom flex justify-between align-center">
								<view class="">
									订单日期：2021-04-21
								</view>
								<view class="" style="color: #40C6A8;">
									已接单
								</view>
							</view>
						</view>
						<view class="flex align-center pl30 pr30 u-border-bottom justify-between h176">
							<view class="flex">
								<image src="../../static/img.jpg" class="w110 h110 r55" mode=""></image>
								<view class="ml30">
									<view class="f30 mb22" style="font-weight: 600;">liuliu</view>
									<text class="f26" style="color: #333333;">和平精英</text>
								</view>
							</view>
							<view class="f24" style="color: #333333;">
								19星
							</view>
						</view>
						<view class="pl30 pr30 h110 flex align-center justify-between">
							<view class="f26">
								合计：
								<text style="color: #FF6000;">38星</text>
							</view>
							<view class="f28">
								<button type="default" class="cu-btn"
									style="background-color: #000000; color: #FFFFFF;">接单</button>
							</view>
						</view>
					</view>

					<view class="r20 mb20" style="background-color: #FFFFFF;">
						<view class="f24 pl30 pr30  h70 lh70" style="color: #666666;">
							<view class="u-border-bottom flex justify-between align-center">
								<view class="">
									订单日期：2021-04-21
								</view>
								<view class="" style="color: #FF6000;">
									待接单
								</view>
							</view>
						</view>
						<view class="flex align-center pl30 pr30 u-border-bottom justify-between h176">
							<view class="flex">
								<image src="../../static/img.jpg" class="w110 h110 r55" mode=""></image>
								<view class="ml30">
									<view class="f30 mb22" style="font-weight: 600;">liuliu</view>
									<text class="f26" style="color: #333333;">和平精英</text>
								</view>
							</view>
							<view class="f24" style="color: #333333;">
								19星
							</view>
						</view>
						<view class="pl30 pr30 h110 flex align-center justify-between">
							<view class="f26">
								合计：
								<text style="color: #FF6000;">38星</text>
							</view>
							<view class="f28">
							</view>
						</view>
					</view>
					
					
					
					<view class="r20 mb20" style="background-color: #FFFFFF;">
						<view class="f24 pl30 pr30  h70 lh70" style="color: #666666;">
							<view class="u-border-bottom flex justify-between align-center">
								<view class="">
									订单日期：2021-04-21
								</view>
								<view class="" style="color: #999999;">
									已过期
								</view>
							</view>
						</view>
						<view class="flex align-center pl30 pr30 u-border-bottom justify-between h176">
							<view class="flex">
								<image src="../../static/img.jpg" class="w110 h110 r55" mode=""></image>
								<view class="ml30">
									<view class="f30 mb22" style="font-weight: 600;">liuliu</view>
									<text class="f26" style="color: #333333;">和平精英</text>
								</view>
							</view>
							<view class="f24" style="color: #333333;">
								19星
							</view>
						</view>
						<view class="pl30 pr30 h110 flex align-center justify-between">
							<view class="f26">
								合计：
								<text style="color: #FF6000;">38星</text>
							</view>
							<view class="f28">
								
							</view>
						</view>
					</view>
				</block>
			</view>
		</view>
		<view class="foot_box"></view>
		<!-- 加载提示 -->
		<yy-loading text="加载中.." mask="true" click="true" ref="loading"></yy-loading>
		<!-- 信息提示-->
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				style: {
					marginLeft: 15 + 'rpx',
					height: 8 + 'rpx',
					width: 8 + 'rpx',
					borderRadius: 4 + 'rpx',
					backgroundColor: '#000000',
				},
				listTab: [{
					name: '接单记录'
				}, {
					name: '下单记录'
				}],
				currentIndex: 1,
			};
		},
		onShow() {},
		onLoad(e) {},
		methods: {
			change(index) {
				this.currentIndex = index
			}
		}
	};
</script>

<style lang="scss" scoped>
	page {
		width: 100%;
		height: 100%;
		background-color: #FAFAFA;
	}

	.order-box {

		.order-center {

			.tab-list {
				width: 380rpx;
				padding: 30rpx;
				font-size: 32rpx;
			}

			.take-order {
				padding: 0 30rpx 40rpx;
			}
		}
	}
</style>
